package edu.ubc.javascript;

import com.google.javascript.jscomp.mozilla.rhino.ast.AstNode;
import com.google.javascript.rhino.Node;

@SuppressWarnings("unchecked")
public class WrappedMapTag implements MappedTag {

	private AstNode astNode;
	private NodeTag nodeTag;
	
	public WrappedMapTag(AstNode astNode, NodeTag nodeTag) {
		this.astNode = astNode; 
		this.nodeTag = nodeTag;
	}
	
	@Override
	public Node getNode() {
		return nodeTag.getNode();
	}

	@Override
	public void setNode(Node node) {
		nodeTag.setNode(node);
	}

	@Override
	public String getName() {
		return nodeTag.getName();
	}

	@Override
	public Object getValue() {
		return nodeTag.getValue();
	}

	@Override
	public void setName(String name) {
		nodeTag.setName(name);
	}

	@Override
	public void setValue(Object value) {
		nodeTag.setValue(value);
	}

	@Override
	public AstNode getAstNode() {
		return astNode;
	}

	@Override
	public void setAstNode(AstNode astNode) {
		this.astNode = astNode;
	}

}
